package com.yezi.lampcourt.base;

import android.content.Context;

import java.util.ArrayList;
import java.util.List;

import io.reactivex.disposables.Disposable;

/**
 * Created by HongMing Ye
 * on 2017/9/19 0019.
 */

public class BasePresenter<T extends BaseView> {
    protected Context mContext;
    protected T mView;
    protected List<Disposable> mDisposableList;

    public BasePresenter(Context context, T view) {
        mContext = context;
        mView = view;
        mDisposableList = new ArrayList<>();
    }

    public void onDestory() {
        for (Disposable disposable : mDisposableList) {
            disposable.dispose();
        }
    }

}